Method of coding and decoding image

ABSTRACT

A method of coding/decoding an image is provided. The coding method includes comparing a previous image and a current image of successive images to divide a background region from an object region including an object of the previous image and an object of the current image, coding the object region, and creating data indicating whether the above coding operation is intended for the entire image or the object region and adding the created data to coded data.

This application claims the benefit of the Korean Patent Application No.10-2004-0105725, filed on Dec. 14, 2004, which is hereby incorporated byreference as if fully set forth herein.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method of coding and decoding animage.

2. Description of the Related Art

Various kinds of mobile terminals have been provided. Although themobile terminals get miniaturized, the resolution of screen isincreasing and the number of colors expressible per pixel is increasing.Also, high-quality displays tend to be mounted.

In the mobile terminals, user interface (UI) is developed towardthree-dimensional image and animation UI, as well as simple image.Accordingly, there is an increasing demand for memory space forrecording an image stored in the mobile terminal and displaying it forthe user interface. Developments of a dedicated compression codec forpicture of the UI are actively in progress. Particularly, for a menupicture-type UI, a simple image is being replaced by an animation ofsuccessive images.

Specifically, an image codec for UI picture requires a fast decodingspeed. Most pictures of the UI have to be display immediately when theuser presses buttons. Therefore, in decoding an image stored for UI, adelay time that the user feels has to be minimized. The image has to bedecoded and displayed fast as the user cannot feel the delay time. Inmost cases, the decoding and display have to be completed within 100 ms.For most of the mobile phones, for example a portable phone, alow-performance central processing unit (CPU) such as an advanced RISCmachine 7 (ARM7) and ARM9 controls the UI and thus it is difficult touse a codec such as JPEG having a large amount of computation.

Therefore, a BITMAP that is an original data is used in the UI picture.Since the BITMAP does not perform a compression operation, alarge-capacity memory is required. A codec having a compression ratioranging from ½ up to ⅕ with respect to an original data is used as acodec dedicated to a UI picture. This codec is an applied method of adictionary-based codec such as Lempel Zip Welch (LZW). Although thiscodec has a very fast decoding speed, a compression ratio ranges from ½up to ⅕ with respect to the original data. The most importantrequirement of the codec dedicated to the UI picture is a fast decodingspeed as well as the compression ratio. Accordingly, even in the samecompression algorithm, the technology development to enable the encodingand decoding process to be processed according to the CPU is required.

A following dictionary-based codec is used as an image codec that storesa compressed UI in the mobile terminal and decodes it. FIG. 1illustrates a concept of a related art dictionary-based codec. Thedictionary-based codec is a method of encoding a portion to be currentlyencoded by referring to a previously encoded portion. Referring to FIG.1, a portion to be currently encoded is encoded by referring to N numberof previously encoded data spaced apart from a position to be currentlyencoded by a predetermined distance D. If the matching number of theportion to be currently encoded and the previously encoded portion isless than a preset reference value, the current pixel value is encoded.If the matching number is greater than the reference value, the codingis performed while the distance D from the portion to be currentlyencoded to the position where the matching starts, and the matchingnumber N are encoded.

In the dictionary-based codec, the codec related information includes aninformation as to whether the matching exists or not, a pixel value, thematching number N and distance D. The information related to theexistence of the matching can be expressed in bit and have a headerregion. The pixel value is an information that can be expressed in byteand have a data region. The matching number N and the distance D areinformation requiring bit and byte.

The dictionary-based codec codes a still picture using one outputbuffer. One output buffer is designated during a coding process, and anencoding is performed while using a header pointer and a data pointer.That is, the header and the data are alternately stored in a bitstreamstructure. The method of alternately using the header and the data inone output buffer does not cause problems in PC-like environment.However, such a method causes problems in an environment with restrictedmemory and resource such as a mobile terminal.

That is, when the header and the data are repeatedly stored in oneoutput buffer, positions of pointers where a next header and a next dataare located have to be calculated each time. Also, it is necessary toaccess the memory based on one header and data. Consequently, the numberof times of memory access increases and the decoding speed is degraded.Specifically, in the case of the ARM that is widely used as a processorin the mobile terminal, these factors will degrade the decoding anddisplay speed of UI picture. Thus, there is a demand for a technologythat has a fast decoding and display speed even when thedictionary-based codec is applied in a field requiring a fast decodingspeed, such as a UI picture of a mobile terminal.

Meanwhile, when the UI picture of the mobile terminal is implementedusing an animation, the amount of data that must be processed for theanimation further increases. Particularly, when the ARM is used as aprocessor in the mobile terminal, the animation picture is difficult torapidly display by a related art successive image coding/decodingscheme.

Therefore, there is required an improved technology for rapidlycoding/decoding an animation of successive images by thedictionary-based coding scheme, which can reduce the required capacityof the memory by the system while satisfying the user's demand for theanimation.

SUMMARY OF THE INVENTION

Accordingly, the present invention is directed to a method of coding anddecoding an image that substantially obviate one or more problems due tolimitations and disadvantages of the related art.

An object of the present invention is to provide an imagecoding/decoding method capable of efficiently coding and rapidlydecoding successive images.

Another object of the present invention is to provide an imagecoding/decoding method capable of efficiently coding and rapidlydecoding successive images by a dictionary-based coding/decoding scheme.

A further another object of the present invention is to provide an imagecoding/decoding method capable of efficiently coding and rapidlydecoding successive images for an animation in a UI picture of a mobileterminal by a dictionary-based coding/decoding scheme.

Additional advantages, objects, and features of the invention will beset forth in part in the description which follows and in part willbecome apparent to those having ordinary skill in the art uponexamination of the following or may be learned from practice of theinvention. The objectives and other advantages of the invention may berealized and attained by the structure particularly pointed out in thewritten description and claims hereof as well as the appended drawings.

To achieve these objects and other advantages and in accordance with thepurpose of the invention, as embodied and broadly described herein,there is provided a method of coding an image, including: comparing aprevious image and a current image of successive images to divide abackground region from an object region including an object of theprevious image and an object of the current image; coding the objectregion; and creating data indicating whether the above coding operationis intended for the entire image or the object region and adding thecreated data to coded data.

In another aspect of the present invention, there is provided a methodof coding an image, including: coding the entire region of the firstimage of successive images; dividing a background region from an objectregion including an object of a previous image and an object of acurrent image with respect to a current image of the second or laterframes; and coding the object region of the current image.

In a further another aspect of the present invention, there is provideda method of decoding coded image by dividing a background region from anobject region including an object of a current image and an object of aprevious image, the method including: decoding the entire first image;and decoding the object region of the second or later frame.

According to the present invention, the background region is not codedin the coding operation, and thus the compression rate can be enhanced.The present coding/decoding method can be performed on a UI animationsuch as a menu of a mobile terminal, thereby making it possible torapidly display the corresponding picture and to reduce the requiredcapacity of the memory. In addition, the present coding/decoding methodcan be applied to the coding/decoding operation not only for theUI-dedicated animation image but also for other types of animationimages.

It is to be understood that both the foregoing general description andthe following detailed description of the present invention areexemplary and explanatory and are intended to provide furtherexplanation of the invention as claimed.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are included to provide a furtherunderstanding of the invention and are incorporated in and constitute apart of this application, illustrate embodiment(s) of the invention andtogether with the description serve to explain the principle of theinvention. In the drawings:

FIG. 1 is a diagram illustrating a concept of a related artdictionary-based codec;

FIG. 2 is a conceptual diagram illustrating a method of codingsuccessive images according to an embodiment of the present invention;

FIG. 3 is a conceptual diagram illustrating a basic encoding algorithmfor the coding method according to the present invention;

FIG. 4 is a flowchart illustrating a method of coding successive imagesaccording to an embodiment of the present invention;

FIG. 5 is a diagram illustrating an example where a flag is insertedduring a coding operation on successive images;

FIG. 6 is a flowchart illustrating a method of decoding successiveimages according to an embodiment of the present invention; and

FIG. 7 is a conceptual diagram illustrating a process of decodingsuccessive images encoded by the coding method according to the presentinvention.

DETAILED DESCRIPTION OF THE INVENTION

Reference will now be made in detail to the preferred embodiments of thepresent invention, examples of which are illustrated in the accompanyingdrawings. Wherever possible, the same reference numbers will be usedthroughout the drawings to refer to the same or like parts.

FIG. 2 is a conceptual diagram illustrating a method of codingsuccessive images according to an embodiment of the present invention.

Referring to FIG. 2, a UI animation, such as a menu used in a mobileterminal, includes an arrangement of similar simple images. The mainfeature of the UI animation is that an animation effect is obtained bymoving one or two object image on a background image. For example, asillustrated in FIG. 2, a mobile phone-shaped object image moves tocreate an animation formed of six images.

The present invention provides an image coding/decoding method capableof efficiently creating an animation effect by successively displayingsimilar images. In the present embodiment, similar successive images aredivided into a background region and an object region and then theimages are coded and decoded using a dictionary-based coding scheme.

FIG. 3 is a conceptual diagram illustrating a basic encoding algorithmfor the coding method according to the present invention.

Referring to FIG. 3, a reference numeral 301 denotes a previous imagethat is previously encoded on a UI animation picture such as a menu usedin a mobile terminal. A reference numeral 302 denotes a current imagethat is to be encoded on the animation picture. A reference numeral 303denotes a residual image that is to be encoded by comparison of theprevious image 301 and the current image 302.

The residual image 303 is an image region that is obtained bysubtracting the previous image 301 from the current image 302. Theresidual image 303 is divided into a background region 310 and an objectregion 320. The object region 320 is a new region created by an object Aof the previous image 301 and an object B of the current image 302. Thebackground region 310 is a group of pixels represented by a value of‘0’, and the object region 320 is a group of pixels represented by anon-0 value.

The related art method codes an image irrespective of the similaritybetween images.

In the present embodiment, only the object region 320 of the residualimage 302 is coded by the UI-dedicated codec using the dictionary-basedcoding scheme, without coding the background region 310 of the residualimage 303. In addition, data about a start point P1 and an end point P2of the object region 320 are encoded as data indicating the objectregion 320. The data indicating the object region 320 are referredduring the corresponding decoding process.

FIG. 4 is a flowchart illustrating a method of coding successive imagesaccording to an embodiment of the present invention.

Referring to FIG. 4, successive image data are inputted for coding inoperation S410. In operation S420, it is determined whether or not theinputted image data is the first frame (image). If the inputted imagedata is the first frame, the method proceeds to operation S430, and ifnot, the method proceeds to operation S440. In operation S430, theentire image is coded using the dictionary-based coding scheme. Inoperation S440, the image is divided into the background region 310 andthe object region 320 and then only the object region 320 is coded.

Operation S440 will now be described in detail. In operation S441, theinputted image data are divided into the background region 310 and theobject region 320. For this purpose, the residual image 303 is obtainedby subtracting the previous image 301 from the current image 302. Theresidual image 303 includes the object A of the previous image 301 andthe object B of the current image 302. After the current image isdivided into the object region 320 and the background region 310, onlythe object region 320 is coded by the dictionary-based coding scheme inoperation S442.

Upon completion of the coding operation on the object region 320, dataindicating the object region 320 among the entire residual image areadded. In operation S443, for example, data about the start point P1 andthe end point P2 of the object region 320 are encoded as data indicatingthe object region 320. Therefore, the object region 320 can beidentified from the data indicating the object region 320. Accordingly,only the object region can be decoded during the corresponding imagedecoding process by referring to the data indicating the object region320.

After the entire first frame (image) is coded or only the object regionis coded with respect to the second or later frames, data indicatingwhether or not the coded data corresponds to the first frame are addedin operation S450. In the present embodiment, a 1-bit flag may be usedas the data indicating whether or not the coded data corresponds to thefirst frame.

FIG. 5 is a diagram illustrating an example where a flag is insertedduring a coding operation on successive images.

Referring to FIG. 5, when only the object region is coded during thecoding operation on the successive images, ‘1’ is inserted as a flag. Onthe other hand, when the entire image region is coded, ‘0’ is insertedas a flag. Accordingly, whether the coding operation has been performedon only the object region or the entire image region can be determinedduring the corresponding decoding operation according to whether theflag is ‘1’ or ‘0’.

In case of the first image frame, the entire image region is compressedby the dictionary-based coding scheme, and the resulting data areencoded after insertion of a ‘0’ flag thereinto. In case of the secondor later frames, the image frame is divided into a background region 310and an object region 320, only the object region 320 is compressed, andthe resulting data are encoded after insertion of a ‘1’ flag thereinto.

A method of decoding successive images according to the presentinvention will now be described in detail.

FIG. 6 is a flowchart illustrating a method of decoding successiveimages according to an embodiment of the present invention.

Referring to FIG. 6, coded successive images are inputted in operationS610. In operation S620, it is determined whether or not the inputtedimage data correspond to the first frame (image). Whether or not theinputted image data correspond to the first frame can be determined fromthe flag bit inserted during the coding operation. When the insertedflag bit is ‘0’, the first frame (image) needs to be currently decoded.On the other hand, when the inserted flag bit is ‘1’, the second orlater frames (image) need to be currently decoded.

If the inputted image data correspond to the first frame, the entireregion of the first frame image is decoded in operation S630. That is,when a read flag bit is ‘0’, it is determined that the entire region ofthe first frame image was coded in the previous coding operation.Therefore, the entire image region is decided using the UI-dedicatedcodec. For example, in case where the image data are coded using adictionary-based coding scheme, the coded image data can be decodedusing a dictionary-based decoding scheme.

On the other hand, if the inputted image data correspond to the secondor later frames (not the first frame), only the object region of theframe is decoded in operation S640. That is, when a read flag bit is‘1’, it is determined that only the object region was coded in theprevious coding operation. Therefore, the data indicating the objectregion is read in to discriminate and decode the image data of theobject region. At this time, the same background region as in theprevious frame is used and an image formed of only the object region isdecoded and combined with the background region.

Operation S640 will now be described in detail.

In operation S641, the inputted image data are divided into a backgroundregion and an object region. This division can be performed using thedata indicating the object region, that is, a start point P1 and an endpoint P2 of the object region. Thereafter, the object region data aredecoded in operation S642. In case where the object region was codedusing the dictionary-based coding scheme, the coded object region isdecoded using the dictionary-based decoding scheme. Thereafter, usingthe start point P1 and the end point P2, non-object data of the previousframe, that is, the background region, is combined with the objectregion in operation S643.

Thereafter, the entire image is displayed in operation S650. Inoperation S650, the decoded image data of the first frame and thedecoded data of the second or later frames are successively displayed.

FIG. 7 is a conceptual diagram illustrating a process of decodingsuccessive images encoded by the coding method according to the presentinvention.

Referring to FIG. 7, a reference numeral 701 denotes an imagecorresponding to when a flag bit is ‘0’. A reference numeral 702 denotesan object region corresponding to when a flag bit is ‘1’. When the flagbit is ‘0’, the entire image region is decoded. On the other hand, whenthe flag bit is ‘1’, the object region is decoded. At this time, thebackground image of the previous frame is stored in a decoding buffer,and only the object region is decoded and combined with the non-objectregion data of the previous frame, thereby obtaining a completelydecoded image as denoted as a reference numeral 703.

As described above, the background region is not coded with respect tothe second or later frames during the coding operation, and thus thecompression rate can be enhanced. Also, only the object region isdecoded with respect to the second and later frames, and thus the UIanimation can be efficiently implemented.

It will be apparent to those skilled in the art that variousmodifications and variations can be made in the present invention. Thus,it is intended that the present invention covers the modifications andvariations of this invention provided they come within the scope of theappended claims and their equivalent.

1. A method for coding an image, comprising: comparing a previous imageand a current image of successive images to divide a background regionfrom an object region including an object of the previous image and anobject of the current image; coding the object region; and creating dataindicating whether the above coding operation is intended for the entireimage or the object region and adding the created data to coded data. 2.A method for coding an image, comprising: coding the entire region ofthe first image of successive images; dividing a background region froman object region including an object of a previous image and an objectof a current image with respect to a current image of the second orlater frames; and coding the object region of the current image.
 3. Themethod according to claim 2, wherein the coding operations aredictionary-based coding operations.
 4. The method according to claim 2,further comprising data indicating whether the coding operation isintended for the entire region of the image or only the object region ofthe image.
 5. The method according to claim 2, where a 1-bit flag isused as data indicating whether the coding operation is intended for theentire region of the image or only the object region of the image. 6.The method according to claim 2, further comprising data indicating theobject region.
 7. The method according to claim 2, further comprisingdata indicating a start point and an end point of the object region. 8.The method according to claim 2, wherein the object region is obtainedby subtracting the previous image from the current image.
 9. A methodfor decoding coded image by dividing a background region from an objectregion including an object of a current image and an object of aprevious image, the method comprising: decoding the entire first frameimage; and decoding the object region of the second or later frameimage.
 10. The method according to claim 9, wherein the image decodingoperation are dictionary-base decoding operations.
 11. The methodaccording to claim 9, further comprising data indicating whether thedecoding operation is intended for the entire region of the image oronly the object region of the image.
 12. The method according to claim9, where a 1-bit flag is used as data indicating whether the decodingoperation is intended for the entire region of the image or only theobject region of the image.
 13. The method according to claim 9, furthercomprising data indicating the object region.
 14. The method accordingto claim 9, further comprising data indicating a start point and an endpoint of the object region.
 15. The method according to claim 9, whereinthe object region is obtained by subtracting the previous image from thecurrent image.
 16. The method according to claim 9, further comprisingcombining the decoded object region with a previously-decoded backgroundregion.